package com.hnust.root.dao.mapper.wx;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnust.root.dao.entity.domain.forward.UserMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

//处理用户消息
@Mapper
@Repository
public interface UserMassageMapper extends BaseMapper<UserMessage> {

    //用户阅读消息
    @Update("update user_message set flag = !flag where id = #{msgId}")
    int readMessage(@Param("msgId") int msgId);
}
